﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VillagesList.aspx.cs" Inherits="Pap.Web.Modules.Administration.Views.VillagesList"
    MasterPageFile="~/MasterPages/Core.Master" meta:resourcekey="PageResource1" %>

<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <ext:FitLayout runat="server">
        <ext:FormPanel ID="FormPanel1" runat="server" AutoScroll="true">
            <Body>
                <ext:Store runat="server" ID="villageStore">
                    <Reader>
                        <ext:JsonReader ReaderID="VillageID">
                            <Fields>
                                <ext:RecordField Name="VillageName">
                                </ext:RecordField>
                                <ext:RecordField Name="VillageID">
                                </ext:RecordField>
                            </Fields>
                        </ext:JsonReader>
                    </Reader>
                </ext:Store>
                <ext:FitLayout runat="server">
                    <ext:GridPanel runat="server" ID="grvVillages" StoreID="villageStore" Title="Villages List"
                        AutoWidth="true" TrackMouseOver="true" StripeRows="true">
                        <ColumnModel runat="server">
                            <Columns>
                                <ext:Column DataIndex="VillageName" Header="Name" />
                                <ext:CommandColumn Width="30" Align="Center">
                                    <Commands>
                                        <ext:GridCommand CommandName="Edit" Icon="NoteEdit" ToolTip-Text="Edit" />
                                    </Commands>
                                </ext:CommandColumn>
                            </Columns>
                        </ColumnModel>
                        <SelectionModel>
                            <ext:RowSelectionModel runat="server" />
                        </SelectionModel>
                        <AjaxEvents>
                            <Command OnEvent="GrvVillages_Command">
                                <ExtraParams>
                                    <ext:Parameter Name="CommandName" Value="command" Mode="Raw" />
                                </ExtraParams>
                            </Command>
                        </AjaxEvents>
                    </ext:GridPanel>
                </ext:FitLayout>
            </Body>
        </ext:FormPanel>
    </ext:FitLayout>
</asp:Content>
